<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class activity_user extends Model
{
    public $table = 'activity_user';
    public $timestamps = false;
    protected $fillable = [];
    public $primaryKey = "id";

    // 活动参与人数
    const usernumber = 4;


    protected function userlist($job_id)
    {
        $list = $this->select('activity_user.ct','activity_user.face','user.nickName','user.avatarUrl')
            ->leftjoin('user', 'user.openid', 'activity_user.openid')
            ->where('activity_user.job_id', $job_id)
            ->orderBy('activity_user.id', 'asc')
            ->get();
        return $list;
    }


}
